home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / TeXsource / web2ctex / ctex / h / text < prev    next >
Encoding:
Text File  |  1990-07-27  |  2.2 KB  |  89 lines

  1. /* :-> h.text
  2.  *
  3.    <Description>
  4.  *
  5.  * This file may be freely copied and used, but NOT modified.
  6.  *
  7.  * (C) 1989 WayForward Technologies
  8.  * ---Tiggr & Graham
  9.  */
  10.  
  11.  
  12. /* Initialise the buffer, window and task.
  13.  *
  14.  * nc   : number of columns (on the screen and the buffer).
  15.  * nr   : number of screen rows.
  16.  * bufr : number of rows in the buffer.
  17.  * title: title of the window (truncated to 12 chars) and of the task.
  18.  * inc  : initial number of columns visible.
  19.  * inr  : initial number of rows visible.
  20.  *
  21.  * Returns : 0 if no error
  22.  */
  23. extern int
  24. text_init (int nc, int nr, int bufr, char *title, int inc, int inr, int intch);
  25.  
  26.  
  27. /* Force Wimp_CloseDown to be called (id est sign off as a task).
  28.  */
  29. extern void
  30. text_closedown (void);
  31.  
  32.  
  33. /* Put a character with the specified attributes at the specified position.
  34.  *
  35.  * ch  : character to be put.
  36.  * attr: attributes of the character (none of which are defined yet. Use 0).
  37.  * col : column where to put the character
  38.  * row : row where to put it.
  39.  *
  40.  * Returns: 0 if no error
  41.  */
  42. extern int
  43. text_putch (char ch, int attr, int col, int row);
  44.  
  45.  
  46. /* Handle window events
  47.  *
  48.  * immediate_exit: if !=0 then in case of a close_window event or a quit
  49.  *                 message, it will call exit () immediately. If ==0 it will
  50.  *                 return with a result code (ONLY ONCE).
  51.  *
  52.  * Returns: 1 : some parts of the window are invalid, and text_update ()
  53.  *              should be called.
  54.  *          0 : normal
  55.  *         -1 : program should exit.
  56.  */
  57. extern int
  58. text_poll (int immediate_exit);
  59.  
  60.  
  61. /* Get a key from the 256 character type-ahead buffer
  62.  *
  63.  * Returns: -1  : no character available
  64.  *          !-1 : character value
  65.  */
  66. extern int
  67. text_inkey (void);
  68.  
  69.  
  70. /* Controls updating the screen after calls to text_putch (). The latter does
  71.  * not update information in the window. text_update () should be called to
  72.  * do that. The reason for this is, that text_update can be called less
  73.  * frequently to speed things up (enormously).
  74.  */
  75. extern void
  76. text_update (void);
  77.  
  78.  
  79. /* Scroll the screen
  80.  */
  81. extern void
  82. text_scroll (void);
  83.  
  84.  
  85. /* Force the screen to become visible, even in case the user is watching some
  86.  * part of the history buffer.
  87.  */
  88. extern void text_open_screen (void);
  89.